<?php
class AddType extends Action {
	/* (non-PHPdoc)
	 * @see Action::execute()
	 */
	public function execute($params) {
		check_login ( ADMIN_LOGIN_PAGE );
		$data = sess_del ( 'page_type_info' );
		$data ['error'] = sess_del ( 'page_type_error', array () );
		$data ['error_cls'] = ModelValidator::getErrorCls ( $data ['error'] );
		$data ['page_tip_info'] = sess_del ( 'page_tip_info' );
		$data ['alert_cls'] = 'alert-error';
		$data ['nodes'] = json_encode ( WebTemplateModel::getTemplateTreeData () );
		return new SmartyView ( $data, 'theme/AddType' );
	}
}